#ifndef TELEGRAM_H
#define TELEGRAM_H



//==============================================================================
// structure for messaging
struct Telegram {
	// sender of message
	int sender;

	// receiver of message
	int receiver;

	// message, indicated as integer
	int message;

	// dispatch time
	double dispatchTime;

	// any extra information that may be needed
	void* extraInfo;

//---- Constructors ----
	Telegram(double p_delay,
			int p_sender,
			int p_receiver,
			int p_message,
			void* p_extraInfo = 0) :
		dispatchTime(p_delay),
		sender(p_sender),
		receiver(p_receiver),
		message(p_message),
		extraInfo(p_extraInfo)
	{}

	Telegram():
		dispatchTime(-1),
		sender(-1),
		receiver(-1),
		message(-1)	
	{}
};
//==============================================================================



//---- Comparison operators ---- 
bool operator==(const Telegram& p_t1, const Telegram& p_t2);

bool operator<(const Telegram& p_t1, const Telegram& p_t2); 



#endif